import '../css/iconfont.css';
import '../css/index.css';
import '../css/index.scss';
// import '@babel/polyfill';
import print from './ptint';

console.log('index.js被加载了~');

const add = (x, y) => x + y;
print();

console.log(add(1, 2));
const promise = new Promise(resolve => {
  setTimeout(() => {
    console.log('定时器执行了~');
    resolve();
  }, 1000);
});
console.log(promise);

if (module.hot) {
  module.hot.accept('./ptint.js', () => {
    print();
  });
}
